<template>
	<view class="page-center">
		<nav-bar title="报价" :showLeftIcon="true" :leftSlot="false"></nav-bar>

		<view class="quotatin" :style="{'height': scrollHeight}">
			<view class="quotatin-item">
				<view class="base-info">
					<view class="base-info-left">
						<!-- 头像缺 -->
						<view class="header-img"></view>
						<text>yaoyao~</text>
					</view>
					<view class="release-item">
						2024-09-04发布
					</view>
				</view>
				<view class="to-place">
					<text>南京 江宁</text>
					<image src="@/static/images/public/to-hear.png" mode=""></image>
					<text>徐州 铜山</text>
				</view>
				<view class="car-info">
					<text>轿车</text>
					<text style="margin: 0 10rpx;">/</text>
					<text>1台</text>
					<text style="margin: 0 10rpx;">/</text>
					<text>能正常行驶</text>
				</view>
				<view class="check-time">
					<text>托运日期：2024-09-07</text>
					<text class="dimension">(明天)</text>
				</view>
			</view>
			
			<view class="info-fillin">
				<view class="fillin-item">
					<view class="fillin-item-title">预计到达时间</view>
					<view class="fillin-item-content" @click="selectTime">
						<view class="selct-placeholder">请选择</view>
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view>
				<view class="fillin-item">
					<view class="fillin-item-title">预计总价（元）</view>
					<view class="fillin-item-content">
						<u-input
							border="false"
							v-model="price"
							input-align="right"
							placeholder="请填写"
							placeholder-style="color: #999;font-size: 28rpx"/>
					</view>
				</view>
			</view>
		</view>



		<!-- 电话联系  报价 -->
		<view class="opeart">
			<view class="opeart-btn opeart-quotation">
				<text>提交报价</text>
			</view>
		</view>


		<u-datetime-picker
			:show="isShowTime"
			v-model="timeValue"
			mode="date"
			@cancel="isShowTime = false"
		></u-datetime-picker>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				scrollHeight: '',
				price: '',
				isShowTime: false,
				timeValue: Number(new Date()),
			}
		},
		async onLoad() {
			this.scrollHeight = this.$store.getters.heightData.noTabMainHeight + 'px'
			console.log(this.$store.getters.heightData)
		},
		methods: {
			navigator(url) {
				uni.navigateTo({
					url
				})
			},
			selectTime() {
				this.isShowTime = true;
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page-center {
		font-family: "PingFang SC";
		font-size: 26rpx;
		position: relative;
		background: #f6f6f6;
		width: 100%;
		height: 100vh;
		position: relative;
	}

	.flex-sp {
		display: flex;
		justify-content: space-between;
	}

	.quotatin {
		overflow-y: auto;
		.quotatin-item {
			background-color: #fff;
			padding: 40rpx 28rpx;
		}
		.base-info {
			display: flex;
			font-size: 24rpx;
			color: #333;
			justify-content: space-between;
			align-items: center;
			line-height: 1;

			.base-info-left {
				display: flex;
			}

			.header-img {
				width: 36rpx;
				height: 36rpx;
			}

			.release-item {
				color: #999;
			}
		}

		.to-place {
			font-size: 30rpx;
			color: #1A1A1A;
			margin-top: 10rpx;

			image {
				width: 35rpx;
				height: 8rpx;
				margin: 0 12rpx;
				vertical-align: middle;
			}

			.place-number {
				font-size: 44rpx;
				color: #1777FF;
			}
		}

		.car-info {
			color: #ff7512;
			font-size: 26rpx;
			margin-top: 20rpx;
			line-height: 1;
		}

		.check-time {
			color: #9F9F9F;
			font-size: 24rpx;
			margin-top: 18rpx;
			line-height: 1;

			.dimension {
				color: #1777ff;
				margin: 20rpx;
			}

			.dimension-fill {
				color: #1C1C1C;
				font-size: 26rpx;
			}
		}
	}
	
	.info-fillin {
		background: #fff;
		padding: 0 24rpx;
		border-radius: 12rpx;
		margin-top: 20rpx;
		.selct-placeholder {
			color: #999;
			font-size: 28rpx;
		}
		.fillin-item {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 30rpx 0;
			border-bottom: 2rpx solid #e9e9e9;
			&:last-of-type {
				border-bottom: 0;
			}
			.fillin-item-content {
				font-size: 28rpx;
				font-weight: 500;
				color: #1a1a1a;
				display: flex;
				align-items: center;
				text {
					margin-right: 10rpx;
				}
				.u-radio {
					margin-right: 40rpx;
					&:last-of-type {
						margin-right: 0;
					}
				}
			}
		}
		.fillin-item-title {
			color: #666;
			font-size: 28rpx;
			line-height: 40rpx;
		}
	}

	.opeart {
		padding: 16rpx 28rpx;
		display: flex;
		position: absolute;
		left: 0;
		bottom: 0;
		width: 100vw;
		background: #fff;

		.opeart-btn {
			flex: 1;
			height: 88rpx;
			border-radius: 16rpx;
			font-size: 32rpx;
			text-align: center;
			line-height: 88rpx;
			background: #1777ff;
			color: #fff;
		}
	}
</style>